CROSS_COMPILE=/opt/gcc-linaro-arm-linux-gnueabihf-4.7/bin/arm-linux-gnueabihf-
CC=$(CROSS_COMPILE)gcc
CXX=$(CROSS_COMPILE)g++
AR=$(CROSS_COMPILE)ar

CFLAGS= -Wall -Wcomment -g -fPIC -shared
CXXFLAGS= -Wall -g
LDFLAGS= -L ./sqlite3_lib/ -lsqlite3

src=libdatabase.c
dest=libdatabase.so

test_src=main.o
test_dest=test_db


$(dest):$(src)
	$(CC) $(CFLAGS) $(LDFLAGS)  $^ -o $@

$(test_dest):$(test_src)
	$(CXX) $(LDFLAGS) -ldatabase $^ -o $@
clean:
	rm $(dest) $(test_dest)

